$font-family-sans-serif: 'Open Sans', Verdana, "Helvetica Neue", Helvetica, Arial, sans-serif;
$font-family-serif: 'Noto Serif', Georgia, "Times New Roman", Times, serif;
$font-family-base: $font-family-serif;
$headings-font-family: $font-family-sans-serif;
$breadcrumb-divider: "→";

// Then import Bootstrap an BootstrapVue SCSS files (order is important)
@import '~bootstrap';
@import '~bootstrap-vue';

$footer-height: ($spacer);

body {

  > .container {
    padding-top: $spacer;
    padding-bottom: $spacer;
  }

  > div#app div#breadcrumbs {
    padding-top: $spacer;
    padding-bottom: 0;
  }

  margin-bottom: $footer-height * 2.5;
}

.card {
  margin-bottom: $spacer;
}

.shortDate {
  font-weight: bold;
  font-family: $headings-font-family;
  color: $gray-500;
}

.img-error {
  max-width: 100%;
  margin: auto;
  display: block;
}

.nav, .navbar, .breadcrumb, .text-muted {
  font-family: $font-family-sans-serif;
}

html {
  position: relative;
  min-height: 100%;
}

.footer {
  position: absolute;
  bottom: 0;
  display: table;
  width: 100%;
  height: $footer-height;
  border-top: 1px solid $hr-border-color;
  color: $text-muted;
  background-color: #f5f5f5;
  text-align: center;

  & > .container {
    display: table-cell;
    vertical-align: middle;

    p:last-child {
      margin-bottom: 0;
    }
  }
}

.ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

td {
  &.ellipsis {
    max-width: 0;
  }
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  small,
  .small {
    color: $gray-500;
  }
}

// Signin

$btn-padding-y: 0.5rem;
$btn-padding-y-lg: 0.75rem;
$btn-padding-y-sm: 0.25rem;
$btn-line-height: 1.25;
$btn-padding-x: 1rem;
$btn-padding-x-lg: 1.5rem;
$btn-padding-x-sm: 0.5rem;
$padding-base-horizontal: $btn-padding-y;
$padding-large-horizontal: $btn-padding-y-lg;
$padding-small-horizontal: $btn-padding-y-sm;

$bs-height-base: floor($btn-line-height + $btn-padding-x * 2);
$bs-height-lg: floor($btn-line-height + $btn-padding-x-lg * 2);
$bs-height-sm: floor($btn-line-height + $btn-padding-x-sm * 2);
$bs-height-xs: floor($btn-line-height + $btn-padding-x-sm * 2);

.btn-social {
  position: relative;
  padding-left: $bs-height-base + $padding-base-horizontal;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  > :first-child {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: $bs-height-base;
    line-height: $bs-height-base + 2;
    font-size: 1.6em;
    text-align: center;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
  }

  &.btn-lg {
    padding-left: $bs-height-lg + $padding-large-horizontal;

    > :first-child {
      line-height: $bs-height-lg;
      width: $bs-height-lg;
      font-size: 1.8em;
    }
  }

  &.btn-sm {
    padding-left: $bs-height-sm + $padding-small-horizontal;

    > :first-child {
      line-height: $bs-height-sm;
      width: $bs-height-sm;
      font-size: 1.4em;
    }
  }

  &.btn-xs {
    padding-left: $bs-height-xs + $padding-small-horizontal;

    > :first-child {
      line-height: $bs-height-xs;
      width: $bs-height-xs;
      font-size: 1.2em;
    }
  }
}

.btn-social {
  > :first-child {
    line-height: $btn-line-height !important;
    padding-top: $btn-padding-y !important;
    padding-bottom: $btn-padding-y !important;
    font-size: inherit !important;
  }

  &.btn-lg {
    > :first-child {
      line-height: $btn-line-height !important;
      padding-top: $btn-padding-y-lg !important;
      padding-bottom: $btn-padding-y-lg !important;
      font-size: inherit !important;
    }
  }
}

.btn-social-icon {
  @extend .btn-social;

  height: $bs-height-base;
  width: $bs-height-base;
  padding: 0;

  > :first-child {
    border: none;
    text-align: center;
    width: 100% !important;
  }

  &.btn-lg {
    height: $bs-height-lg;
    width: $bs-height-lg;
    padding-left: 0;
    padding-right: 0;
  }

  &.btn-sm {
    height: $bs-height-sm;
    width: $bs-height-sm;
    padding-left: 0;
    padding-right: 0;
  }

  &.btn-xs {
    height: $bs-height-xs;
    width: $bs-height-xs;
    padding-left: 0;
    padding-right: 0;
  }
}

@mixin btn-social($color-bg, $color: null) {
  @if $color {
    color: $color;
  }

  @include button-variant($color-bg, $color-bg);
}

.btn-google {
  @include btn-social(#dd4b39);
}

.btn-yandex {
  @include btn-social(#dd4b39);
}

.btn-github {
  @include btn-social(#444444);
}

// Apache

pre.code, code {
  color: #0d0d97;
}

code {
  background-color: transparent;
  border: none;
  padding: 0;
}

pre.code {
  font-family: "Courier New", Courier, monospace;
  font-size: 95%;
  background-color: transparent;
  border: none;
}

/* Tables */

div.table, div.breadcrumbs, div.bottomMenuContainer, div.directive {
  height: 0;
}

div.tr {
  height: 0;
}

/* не для IE */
div.table[class], div.breadcrumbs[class], div.bottomMenuContainer[class], div.directive[class] {
  height: auto;
  display: table;
}

div.tr[class] {
  height: auto;
  display: table-row;
}

div.td[class], div.th[class] {
  float: none;
  display: table-cell;
}

div.td, div.th {
  height: 100%;
  float: left;
}

div.th {
  font-weight: bold;
}

div.example {
  color: #000;
  padding: 0.5em;
  margin: 1em 2em 1em 1em;
  width: 50%;
  background-color: #e5ecf3;

  p, pre, table {
    padding: 0;
    margin: 0;
  }

  p {
    line-height: 1em;
  }
}

div.note, div.warning {
  background-color: #eee;
  color: #036;
  padding: 0.5em;
  margin: 1em 2em 1em 1em;

  div.example {
    background-color: transparent;
    color: inherit;
    margin-right: 1em;
  }

  p {
    margin: 0.5em 0 0 0;
    padding: 0;
  }
}

div.directive {
  div.td, div.th {
    padding: 3px;
  }
}

div.warning {
  border: 1px solid #f00;
}

/* example inside table */
table {
  div.example {
    margin-right: 1em;
  }
}
